<div class="pub-body">
  <el-row type="flex" class="row-bg" justify="space-between">
    <el-col :span="12">
<!--      <el-button type="primary" @click="changeType(1)">负责人</el-button>-->
<!--      <el-button type="primary" @click="changeType(2)">科长</el-button>-->
<!--      <el-button type="primary" @click="changeType(3)">计划科</el-button>-->
    </el-col>
    <el-col :span="4"  v-show="type===1">
      <div>
        <el-button type="primary" @click="goChange()">新增</el-button>
      </div>
    </el-col>
  </el-row>
  <div class="pub-body">
    <el-form ref="personalFrom" :model="planInfo" label-width="200px" v-show="type===0">
      <h1>&nbsp;&nbsp;&nbsp;负责人变更申请</h1>
      <el-form-item prop="selectedPlanId" :required="true" label="选择节点">
        <el-select v-model="planInfo.selectedPlanId" placeholder="请选择">
          <el-option
            v-for="item in planList"
            :key="item.value"
            :label="item.label"
            :value="item.value">
          </el-option>
        </el-select>
      </el-form-item>
      <el-form-item prop="reasonItem" :required="true" label="变更原因">
        <el-input
          prop="reasonInput"
          style="width: 450px"
          type="textarea"
          :rows="3"
          placeholder="请输入详细说明"
          v-model="planInfo.reason">
        </el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="sumbit()">提交变更申请</el-button>
        <el-button @click="submitCancel()">取消</el-button>
      </el-form-item>
    </el-form>
    <div v-show="type===1">
      <el-table :data="dealPlanList" border style="width: 100%"
                :header-cell-style="{background:'#eef1f6',color:'#606266'}">
        <el-table-column prop="dealNo" label="处理单号" width="200"></el-table-column>
        <el-table-column prop="createTime" label="提交日期"></el-table-column>
        <el-table-column prop="planDeal" label="节点名称"></el-table-column>
        <el-table-column prop="oldPerson" label="原责任人"></el-table-column>
        <el-table-column prop="newPerson" label="新责任人"></el-table-column>
        <el-table-column fixed="right" label="操作" width="320">
          <template slot-scope="scope">
            <el-button @click="dialogAsset(scope.row)" type="primary" size="small">详情</el-button>
            <el-button type="primary" size="small" @click="urge(scope.row)">催办</el-button>
            <el-button type="primary" size="small" @click="urge(scope.row)">审批</el-button>
            <el-button type="primary" size="small" @click="cancel(scope.row)">撤销</el-button>
          </template>
        </el-table-column>
      </el-table>
    </div>
    <el-table :data="dealPlanList" border style="width: 100%"
              :header-cell-style="{background:'#eef1f6',color:'#606266'}" v-show="type===2">
      <el-table-column prop="dealNo" label="处理单号" width="200"></el-table-column>
      <el-table-column prop="createTime" label="提交日期"></el-table-column>
      <el-table-column prop="planDeal" label="计划名称"></el-table-column>
      <el-table-column fixed="right" label="操作" width="280">
        <template slot-scope="scope">
          <el-button @click="dialogAsset(scope.row)" type="primary" size="small">详情</el-button>
          <el-button type="primary" size="small" @click="agree(scope.row)">同意</el-button>
          <el-button type="primary" size="small" @click="reject(scope.row)">驳回</el-button>
        </template>
      </el-table-column>
    </el-table>
    <el-table :data="dealPlanList" border style="width: 100%"
              :header-cell-style="{background:'#eef1f6',color:'#606266'}" v-show="type===3">
      <el-table-column prop="dealNo" label="处理单号" width="200"></el-table-column>
      <el-table-column prop="createTime" label="提交日期"></el-table-column>
      <el-table-column prop="planDeal" label="计划名称"></el-table-column>
      <el-table-column fixed="right" label="操作" width="280">
        <template slot-scope="scope">
          <el-button @click="dialogAsset(scope.row)" type="primary" size="small">详情</el-button>
          <el-button type="primary" size="small" @click="dialogCompanyOpen">变更</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
  <el-dialog
    title="提示"
    :visible.sync="dialogVisible"
    width="30%"
    :before-close="handleClose">
    <span>这是一段信息</span>
    <span slot="footer" class="dialog-footer">
    <el-button @click="dialogVisible = false">取 消</el-button>
    <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
  </span>
  </el-dialog>
  <!-- 详情 -->
  <el-dialog  width="50%"  :title="dialogAssetAdd.title" :visible.sync="dialogAssetAdd.status">
    <el-form>
      <el-row>
        <el-col :span="12">
          <el-form-item prop="assetName" label="计划变更ID">
            <el-input :disabled="true" style="width: 300px;" placeholder="请输入ID"
                      v-model="detail.number"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="提交日期" prop="assetType">
            <el-input :disabled="true" style="width: 300px;" placeholder="请输入资产名称"
                      v-model="detail.date"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item prop="planName" label="计划名称">
            <el-input :disabled="true" style="width: 300px;" placeholder="计划名称"
                      v-model="detail.planName"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item prop="planName" label="审核状态">
            <div style="height: 300px;">
              <el-steps :active="0" align-center  finish-status="success">
                <el-step title="科长" description="科长已同意"></el-step>
                <el-step title="部长" description=""></el-step>
                <el-step title="主任" description=""></el-step>
              </el-steps>
            </div>
          </el-form-item>
        </el-col>
      </el-row>

    </el-form>
  </el-dialog>
  <el-dialog width="1000px" :title="dialogCompany.title" :visible.sync="dialogCompany.status">
    <el-form ref="companyFrom" :rules="companyRules" :model="companyFrom" label-width="160px">
        <el-row>
            <el-col :span="12">
                <el-form-item prop="assetName" label="项目名称">
                    <el-input style="width: 300px;" placeholder="请输入模板名称" v-model="companyFrom.companyName"></el-input>
                </el-form-item>
            </el-col>
            <el-col :span="12">
                <el-form-item prop="assetType" label="项目类型">
                    <el-input style="width: 300px;" placeholder="请输入项目类型" v-model="companyFrom.companyContact"></el-input>
                </el-form-item>
            </el-col>
        </el-row>
        <el-row>
            <el-col :span="12">
                <el-form-item prop="assetLevel" label="变更节点">
                    <el-input style="width: 300px;" placeholder="请输入变更节点" v-model="companyFrom.companyName"></el-input>
                </el-form-item>
            </el-col>
            <el-col :span="12">
                <el-form-item prop="statistics" label="变更天数">
                    <el-input style="width: 300px;" placeholder="请输入变更天数" v-model="companyFrom.companyContact"></el-input>
                </el-form-item>
            </el-col>
        </el-row>
        <el-row>
            <el-col :span="12">
                <el-form-item prop="startTime" label="计划开始时间">
                    <el-date-picker type="date" placeholder="计划开始时间" v-model="companyFrom.restrictedType" style="width: 300px;"></el-date-picker>
                </el-form-item>
            </el-col>
            <el-col :span="12">
                <el-form-item prop="endTime" label="计划结束时间">
                    <el-date-picker type="date" placeholder="计划结束时间" v-model="companyFrom.restrictedType" style="width: 300px;"></el-date-picker>
                </el-form-item>
            </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
              <el-form-item prop="startTime" label="变更后开始时间">
                  <el-date-picker type="date" placeholder="变更后开始时间" v-model="companyFrom.restrictedType" style="width: 300px;"></el-date-picker>
              </el-form-item>
          </el-col>
          <el-col :span="12">
              <el-form-item prop="endTime" label="变更后结束时间">
                  <el-date-picker type="date" placeholder="变更后结束时间" v-model="companyFrom.restrictedType" style="width: 300px;"></el-date-picker>
              </el-form-item>
          </el-col>
      </el-row>
        <el-form-item>
            <el-button type="primary" @click="addCompany('companyFrom')"><span v-text="dialogCompany.title"></span></el-button>
            <el-button @click="resetCompany">重置</el-button>
        </el-form-item>
    </el-form>
  </el-dialog>
</div>
